Method, device, and system for quickly informing CGN exception

ABSTRACT

A method applicable to a commonest application scenario, the method includes: an AR receives a first packet sent in a unicast manner by a CGN. The first packet includes information for indicating Restart announce, the first packet&#39;s source address is the CGN&#39;s address, and the first packet&#39;s destination address is the AR&#39;s address; AR changes the first packet&#39;s destination address to an address of a CPE connected to the AR, to obtain a second packet, where the AR and the CPE are connected by using a Layer 2 network, and the CPE&#39;s address is a multicast address; and the AR sends the second packet. The method is used for quickly informing, after the CGN restarts or undergoes an active/standby switchover, the CPE that an exception occurs, for example, the CGN restarts or undergoes an active/standby switchover, so that a CGN has relatively small load when recreating NAT mapping.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.14/610,388, filed on Jan. 30, 2015, which is a continuation ofInternational Application No. PCT/CN2013/079373, filed on Jul. 15, 2013.The International Application claims priority to Chinese PatentApplication No. 201210274452.X, filed on Aug. 3, 2012. All of theafore-mentioned patent applications are hereby incorporated by referencein their entireties.

TECHNICAL FIELD

The present application relates to the field of network communications,and in particular, to a method, device, and system for quickly informinga CGN exception.

BACKGROUND

Currently, IPv4 addresses are getting exhausted, and the problem of IPaddress shortage is very serious. At present, the problem of IP addressshortage is temporarily alleviated by deploying a Carrier Grade NAT(CGN) device in an operator network. A function of Network AddressTranslation (NAT) is to: when a PC in an internal private network needsto get connected to an external public network, translate an internaladdress used by the PC in the internal private network into a validaddress in the external public network, to ensure normal use of the PCin the external public network. Because multiple PCs in the internalprivate network can share one valid address in the external publicnetwork, the problem of IP address shortage is alleviated to someextent.

Because the CGN plays a crucial role, during actual use, dual-hoststandby is required, or quick recovery can be implemented after the CGNrestarts. However, the CGN stores a large number of dynamic NAT entries;and it is often very difficult to back up these entries in real time,and if the CGN restarts, it is also very difficult to quickly recoverthese entries. As a result, a connection between a PC user in theinternal private network and the external public network has to bere-established.

An IETF (Internet Engineering Task Force) PCP (Port Control Protocol)working group can establish, by using the PCP protocol, the connectionbetween the PC user in the internal private network and the externalpublic network after the CGN restarts or undergoes an active/standbyswitchover. However, a precondition for implementing the recovery isthat a CPE (Customer Premise Equipment) connected to the PC in theinternal private network can quickly sense that the CGN device restartsor undergoes an active/standby switchover. That the CGN restarts orundergoes an active/standby switchover is usually referred to as a CGNexception, which, however, is not limited thereto.

Referring to FIG. 1, currently, a specific method of solution 1includes: when a PCP server (Port Control Protocol server), that is, aCGN, is in an abnormal condition, sending, by using a unicast message,information for indicating Restart announce to each PCP client (PortControl Protocol client), that is, a CPE; and when receiving theinformation for indicating Restart announce, sending, by the PCP client,NAT mapping information to the PCP server by using the PCP protocol.

However, for the method of solution 1, the PCP server needs to recover,in an abnormal condition, all PCP client information that exists beforethe abnormal condition of the PCP server occurs. Because a quantity ofthe information is huge, correspondingly, it needs to take a relativelylong time to recover the information. In addition, the PCP server needsto send a message to each PCP client after the PCP server restarts orundergoes an active/standby switchover, which also increases load of thePCP server.

Referring to FIG. 2, a specific method of solution 2 includes: when aPCP server is in an abnormal condition, sending a Restart announcemessage to each PCP client in a multicast manner.

However, the method of solution 2 is only applicable to a case in whicha network between the PCP server and the PCP client is a Layer 2network, and consequently has a small application scope and isinapplicable to a commonest application scenario at present.

SUMMARY

Embodiments of the present application provide a method, device, andsystem for quickly informing a CGN exception, so that load of a CGN isrelatively small. In addition, the method is applicable to a commonestapplication scenario.

To achieve the foregoing objective, the embodiments of the presentapplication adopt the following technical solutions:

According to a first aspect, a method for quickly informing a CGNexception is provided, where the method includes:

receiving, by an access router AR (Access Router), a first packet sentin a unicast manner by a carrier grade network address translation (CGN)device, where the first packet includes information for indicatingRestart announce, a source address of the first packet is an address ofthe CGN, and a destination address of the first packet is an address ofthe AR;

changing, by the AR, the destination address of the first packet to anaddress of a CPE connected to the AR, to obtain a second packet, wherethe AR and the CPE are connected by using a Layer 2 network, and theaddress of the CPE is a multicast address; and

sending, by the AR, the second packet.

In a first possible implementation manner of the first aspect, thechanging, by the AR, the destination address of the first packet to anaddress of the CPE, to obtain a second packet specifically includes:changing the source address of the first packet to the address of theAR, and changing the destination address of the first packet to theaddress of the CPE, to obtain the second packet.

With reference to the first possible implementation manner of the firstaspect, in a second possible implementation manner of the first aspect,the method further includes: adding a CGN address option to the secondpacket to carry the address of the CGN.

Based on the second possible implementation manner of the first aspect,the CGN address option includes:

an option code, a reserved field, a length of the address of the CGN,and the address of the CGN, where the option code indicates a type ofthe information for indicating Restart announce.

In the first aspect and all the foregoing possible implementationmanners of the first aspect, if the CPE belongs to an IPv4 network, themulticast address is 224.0.0.1; if the CPE belongs to an IPv6 network,the multicast address is ff02::1.

According to a second aspect, an access router AR is provided, where theAR includes:

a receiving unit, configured to receive a first packet sent in a unicastmanner by a carrier grade network address translation (CGN) device,where the first packet includes information for indicating Restartannounce, a source address of the first packet is an address of the CGN,and a destination address of the first packet is an address of the AR;

a generating unit, configured to change, according to the first packetreceived by the receiving unit, the destination address of the firstpacket to an address of a CPE connected to the AR, to obtain a secondpacket, where the AR and the CPE are connected by using a Layer 2network, and the address of the CPE is a multicast address; and asending unit, configured to send the second packet generated by thegenerating unit.

In a first possible implementation manner of the second aspect, thegenerating unit is specifically configured to: according to the firstpacket received by the receiving unit, change the source address of thefirst packet to the address of the AR, and change the destinationaddress of the first packet to the address of the CPE, to obtain thesecond packet.

With reference to the first possible implementation manner of the secondaspect, in a second possible implementation manner of the second aspect,the generating unit is configured to add a CGN address option to thesecond packet to carry the address of the CGN.

According to a third aspect, a system for quickly informing a CGNexception is provided, where the system includes:

a carrier grade network address translation (CGN) device, a customerpremise equipment (CPE), and the foregoing access router AR.

The embodiments of the present application provide a method, device, andsystem for quickly informing a CGN exception. A CGN sends, to an AR in aunicast manner, a first packet including information for indicatingRestart announce. Because there are a limited number of ARs and the ARsare static, the CGN has relatively small load when sending the firstpacket to the AR; the AR can quickly send, to a CPE in a multicastmanner, a second packet including the information for indicating Restartannounce. In addition, it is only required in the method that a Layer 2network is between the AR and the CPE. Therefore, the method isapplicable to a commonest application scenario.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentapplication or in the prior art more clearly, the following brieflyintroduces the accompanying drawings required for describing theembodiments or the prior art. Apparently, the accompanying drawings inthe following description show merely some embodiments of the presentapplication, and a person of ordinary skill in the art may still deriveother drawings from these accompanying drawings without creativeefforts.

FIG. 1 is a schematic diagram of a scenario in which a CGN exception isquickly informed in the prior art;

FIG. 2 is a schematic diagram of another scenario in which a CGNexception is quickly informed in the prior art;

FIG. 3 is a schematic diagram of a scenario in which a CGN exception isquickly informed according to an embodiment of the present application;

FIG. 4 is a schematic block flowchart of a method for quickly informinga CGN exception according to an embodiment of the present application;

FIG. 5 is a schematic diagram of an option format according to anembodiment of the present application;

FIG. 6 is a schematic structural block diagram of an AR according to anembodiment of the present application; and

FIG. 7 is another schematic structural block diagram of an AR accordingto an embodiment of the present application.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present application with reference to theaccompanying drawings in the embodiments of the present application.Apparently, the described embodiments are merely a part rather than allof the embodiments of the present application. All other embodimentsobtained by a person of ordinary skill in the art based on theembodiments of the present application without creative efforts shallfall within the protection scope of the present application.

An embodiment of the present application provides a method for quicklyinforming a CGN exception. Referring to FIG. 3, a CGN sends, to an AR ina unicast manner, a first packet including information for indicatingRestart announce, and the AR generates a second packet according to thefirst packet and sends the second packet in a multicast manner.

As shown in FIG. 4, the method includes the following steps:

S101: A CGN generates a first packet and sends the first packet to anAR, where the first packet includes information for indicating Restartannounce, a source address of the first packet is an address of the CGN,and a destination address of the first packet is an address of the AR.

It should be noted that, preferably, ARs in all the embodiments of thepresent application all refer to routers closest to a CPE. In all theembodiments of the present application, for description, it is used asan example that the information for indicating Restart announceindicates that the CGN restarts or undergoes an active/standbyswitchover, but the present application is not limited thereto, and anyexception may occur in the CGN.

Exemplarily, the AR may be a Broadband Remote Access Server (BRAS).

Optionally, when an exception occurs, for example, the CGN restarts orundergoes an active/standby switchover, the source address of the firstpacket generated by the CGN is an IP address of the CGN, and thedestination address of the first packet is an IP address of the AR.Further, the first packet may further include: a port number of a portthrough which the AR receives the first packet.

In the first packet, the IP address of the CGN, the IP address of theAR, and the port number of the port through which the AR receives thefirst packet are all encapsulated into a packet header of the firstpacket.

Exemplarily, when the CGN restarts or undergoes an active/standbyswitchover, the first packet generated by the CGN may be a UDP packet.The information for indicating Restart announce may be encapsulated intothe UDP packet, and a packet header of the UDP packet is encapsulatedwith the IP address of the CGN, the IP address of the AR, and the portnumber of the port through which the AR receives the first packet.

It should be noted that the first packet is generated only after anabnormal condition occurs, for example, the CGN restarts or undergoes anactive/standby switchover. The foregoing AR is all AR(s) saved in an ARlist of the CGN before an exception occurs, for example, the CGNrestarts or undergoes an active/standby switchover. Therefore, there isat least one AR in all the embodiments of the present application.Because the AR list is static and the number of ARs in the AR list isrelatively small, the CGN can quickly recover the saved AR list afterthe CGN recovers.

When there are multiple ARs, correspondingly, the CGN generates multiplefirst packets and sends the first packet to each AR in a unicast manner,that is, the CGN sends, to each AR in the unicast manner, the firstpacket including the information for indicating Restart announce. Foreach AR, the first packet received by the AR is different only in thatan IP address of a destination AR of the first packet is different. Inother words, a destination address in the first packet received by eachAR is an IP address of the AR.

It should be noted herein that in all the embodiments of the presentapplication, a solution is described only from the perspective of oneAR, and the one AR herein may be any one of all the ARs in the AR listof the CGN. Therefore, no matter which AR receives a packet that is sentby the CGN and includes the information for indicating Restart announce,the packet is all referred to as a first packet in all the embodimentsof the present application.

S102: The AR changes the destination address of the first packet to anaddress of a CPE connected to the AR, to obtain a second packet, wherethe AR and the CPE are connected by using a Layer 2 network, and theaddress of the CPE is a multicast address.

In addition, when the port number of the port through which the ARreceives the first packet, which is included in the first packet, and aport number for indicating a port through which the CPE receives thesecond packet are different, the AR changes the port number of the portthrough which the AR receives the first packet to the port number forindicating the port through which the CPE receives the second packet; ifthe port number of the port through which the AR receives the firstpacket and the port number for indicating the port through which the CPEreceives the second packet are the same, the AR does not need to changethe port number of the port through which the AR receives the firstpacket.

Further, the AR may further change the source address of the firstpacket to the address of the AR.

In all the following embodiments, the AR may determine the address ofthe CPE according to a network to which the CPE belongs, that is, the ARmay determine a multicast address.

Specifically, if the CPE belongs to an IPv4 network, the multicastaddress is 224.0.0.1; if the CPE belongs to an IPv6 network, themulticast address is ff02::1.

Exemplarily, a process of generating the second packet according to thefirst packet may be that: if the AR receives a UDP packet sent by theCGN, and the packet includes the information for indicating Restartannounce, the AR changes, according to a network (an IPv4 network or anIPv6 network) to which the CPE belongs, a destination address in apacket header of the UDP packet to a multicast address corresponding tothe network to which the CPE belongs. That is, if the CPE belongs to anIPv4 network, the multicast address is 224.0.0.1; if the CPE belongs toan IPv6 network, the multicast address is ff02::1.

In addition, when the port number of the port through which the ARreceives the first packet, which is included in the packet header of theUDP packet, and the port number for indicating the port through whichthe CPE receives the second packet are different, the AR changes theport number of the port through which the AR receives the first packetto the port number for indicating the port through which the CPEreceives the second packet; if the port number of the port through whichthe AR receives the first packet and the port number for indicating theport through which the CPE receives the second packet are the same, theAR does not need to change the port number of the port through which theAR receives the first packet.

The AR further changes a source address in the packet header of the UDPpacket to the IP address of the AR.

Further, the AR adds a CGN address option to the second packet to carrythe address of the CGN.

The CGN address option includes: an option code, a reserved field, alength of the address of the CGN, and the address of the CGN, where theoption code indicates a type of the information for indicating Restartannounce.

As shown in FIG. 5, a format of the option encapsulated into the secondpacket may be as follows:

A first byte indicates the option code, a second byte indicates thereserved field, a third byte and a fourth byte indicate the length ofthe address of the CGN, the fifth byte to a twentieth byte indicate theaddress of the CGN, that is, the IP address of the CGN. The IP addressof the CGN is an IPv4 address or an IPv6 address, and when the IPaddress of the CGN is an IPv4 address, the IP address of the CGN isindicated in a form of an IPv4-mapped IPv6 address.

The option may be a THIRD_PARTY for announce (third-party for announce)option.

Exemplarily, the AR further adds the THIRD_PARTY for announce option tothe second packet to carry the address of the CGN, that is, the ARencapsulates the source address (the address of the CGN) of the firstpacket into the THIRD_PARTY for announce option of the second packet.

The THIRD_PARTY for announce option is encapsulated into the secondpacket. Referring to FIG. 5, the first byte may be 1, which is used toindicate a type of the information for indicating Restart announce; thesecond byte indicates the reserved field; the third byte and the fourthbyte may be 16 and are used to indicate the length of the IP address ofthe CGN, that is, 16×8=128 bits; and the fifth byte to the twentiethbyte indicate the IP address of the CGN.

It should be noted that the foregoing exemplary process is not limitedin a time sequence, and is subject to an actual application process.

S103: The AR sends the second packet.

The AR sends the second packet to the CPE according to a destinationaddress in a packet header of the second packet.

Optionally, after receiving the second packet, the CPE sends NAT mappinginformation saved by the CPE to the CGN according to the IP address ofthe CGN in the packet header of the second packet, to request the CGN tocreate the NAT mapping information.

Optionally, after receiving the second packet, the CPE sends NAT mappinginformation saved by the CPE to the CGN according to the IP address ofthe CGN in the THIRD_PARTY for announce option of the second packet, torequest the CGN to create the NAT mapping information.

This embodiment of the present application provides a method for quicklyinforming a CGN exception. A CGN sends, to an AR in a unicast manner, afirst packet including information for indicating Restart announce.Because there are a limited number of ARs and the ARs are static, theCGN has relatively small load when sending the first packet to the AR.The AR can quickly send, to a CPE in a multicast manner, a second packetincluding the information for indicating Restart announce. In addition,it is only required in the method that a Layer 2 network is between theAR and the CPE. Therefore, the method is applicable to a commonestapplication scenario.

An embodiment of the present application provides an AR 60, which isapplicable to the foregoing method embodiment and can perform all theactions of the AR in the foregoing embodiment. As shown in FIG. 6, theAR 60 includes: a receiving unit 601, a generating unit 602, and asending unit 603.

The receiving unit 601 is configured to receive a first packet sent in aunicast manner by a CGN, where the first packet includes information forindicating Restart announce, a source address of the first packet is anaddress of the CGN, and a destination address of the first packet is anaddress of the AR.

Optionally, when an exception occurs, for example, the CGN restarts orundergoes an active/standby switchover, the source address of the firstpacket generated by the CGN is an IP address of the CGN, and thedestination address of the first packet is an IP address of the AR.Further, the first packet may further include: a port number of a portthrough which the AR receives the first packet.

Exemplarily, when an exception occurs, for example, the CGN restarts orundergoes an active/standby switchover, the first packet generated bythe CGN may be a UDP packet. The information for indicating Restartannounce may be encapsulated into the UDP packet, and a packet header ofthe UDP packet is encapsulated with the IP address of the CGN, the IPaddress of the AR, and the port number of the port through which the ARreceives the first packet.

The generating unit 602 is configured to change, according to the firstpacket received by the receiving unit 601, the destination address ofthe first packet to an address of a CPE connected to the AR, to obtain asecond packet, where the AR and the CPE are connected by using a Layer 2network, and the address of the CPE is a multicast address.

The AR may determine the address of the CPE according to a network towhich the CPE belongs, that is, the AR may determine the multicastaddress.

Specifically, if the CPE belongs to an IPv4 network, the multicastaddress is 224.0.0.1; if the CPE belongs to an IPv6 network, themulticast address is ff02::1.

Exemplarily, a process of generating the second packet according to thefirst packet may be that: if the AR receives a UDP packet sent by theCGN, and the packet includes the information for indicating Restartannounce, the AR changes, according to a network (an IPv4 network or anIPv6 network) to which the CPE belongs, a destination address in apacket header of the UDP packet to a multicast address corresponding tothe network to which the CPE belongs. That is, if the CPE belongs to anIPv4 network, the multicast address is 224.0.0.1; if the CPE belongs toan IPv6 network, the multicast address is ff02::1.

In addition, when the port number of the port through which the ARreceives the first packet, which is included in the first packet, and aport number for indicating a port through which the CPE receives thesecond packet are different, the generating unit 602 changes the portnumber of the port through which the AR receives the first packet to theport number for indicating the port through which the CPE receives thesecond packet; if the port number of the port through which the ARreceives the first packet and the port number for indicating the portthrough which the CPE receives the second packet are the same, thegenerating unit 602 does not need to change the port number of the portthrough which the AR receives the first packet.

The generating unit 602 may be specifically configured to: according tothe first packet received by the receiving unit 601, change the sourceaddress of the first packet to the address of the AR, and change thedestination address of the first packet to the address of the CPE, toobtain the second packet.

Exemplarily, if the receiving unit 601 receives a UDP packet sent by theCGN, and the packet includes the information for indicating Restartannounce, the generating unit 602 changes, according to a network (anIPv4 network or an IPv6 network) to which the CPE belongs, a destinationaddress in a packet header of the UDP packet to a multicast addresscorresponding to the network to which the CPE belongs. That is, if theCPE belongs to an IPv4 network, a destination address of the secondpacket is a multicast address 224.0.0.1; if the CPE belongs to an IPv6network, a destination address of the second packet is a multicastaddress ff02::1.

In addition, when the port number of the port through which the ARreceives the first packet, which is included in the packet header of theUDP packet, and the port number for indicating the port through whichthe CPE receives the second packet are different, the generating unit602 changes the port number of the port through which the AR receivesthe first packet to the port number for indicating the port throughwhich the CPE receives the second packet; if the port number of the portthrough which the AR receives the first packet and the port number forindicating the port through which the CPE receives the second packet arethe same, the generating unit 602 does not need to change the portnumber of the port through which the AR receives the first packet.

The generating unit 602 further changes a source address in the packetheader of the UDP packet to the IP address of the AR.

Further, the generating unit 602 is configured to add a CGN addressoption to the second packet to carry the address of the CGN.

The option may be a THIRD_PARTY for announce option.

The THIRD_PARTY for announce option includes: an option code, a reservedfield, a length of the address of the CGN, and the address of the CGN,where the option code indicates a type of the information for indicatingRestart announce. Refer to the method embodiment for a format of theoption encapsulated into the second packet, and details are notdescribed herein again.

The sending unit 603 is configured to send the second packet generatedby the generating unit 602.

Exemplarily, the sending unit 603 is configured to send the secondpacket generated by the generating unit 602 to the CPE according to amulticast address in a packet header of the second packet.

Further, optionally, after receiving the second packet, the CPE sendsNAT mapping information saved by the CPE to the CGN according to the IPaddress of the CGN in the packet header of the second packet, to requestthe CGN to create the NAT mapping information.

Optionally, after receiving the second packet, the CPE sends NAT mappinginformation saved by the CPE to the CGN according to the IP address ofthe CGN in the THIRD_PARTY for announce option of the second packet, torequest the CGN to create the NAT mapping information.

This embodiment of the present application provides an AR. A CGN sends,to an AR in a unicast manner, a first packet including information forindicating Restart announce. Because there are a limited number of ARsand the ARs are static, the CGN has relatively small load when sendingthe first packet to the AR. The AR can quickly send, to a CPE in amulticast manner, a second packet including the information forindicating Restart announce. In addition, it is only required in themethod that a Layer 2 network is between the AR and the CPE. Therefore,the method is applicable to a commonest application scenario.

An embodiment of the present application provides an AR 70, which isapplicable to the foregoing method embodiment and can perform all theactions of the AR in the foregoing embodiment. As shown in FIG. 7, theAR 70 includes: a protocol processing module 701 and a processor 702.

The protocol processing module 701 is configured to receive a firstpacket sent in a unicast manner by a CGN, where the first packetincludes information for indicating Restart announce, a source addressof the first packet is an address of the CGN, and a destination addressof the first packet is an address of the AR.

Optionally, when an exception occurs, for example, the CGN restarts orundergoes an active/standby switchover, the source address of the firstpacket generated by the CGN is an IP address of the CGN, and thedestination address of the first packet is an IP address of the AR.Further, the first packet may further include: a port number of a portthrough which the AR receives the first packet.

The processor 702 is configured to change, according to the first packetreceived by the protocol processing module 701, the destination addressof the first packet to an address of a CPE connected to the AR, toobtain a second packet, where the AR and the CPE are connected by usinga Layer 2 network, and the address of the CPE is a multicast address.

The AR may determine the address of the CPE according to a network towhich the CPE belongs, that is, the AR may determine the multicastaddress.

Specifically, if the CPE belongs to an IPv4 network, the multicastaddress is 224.0.0.1; if the CPE belongs to an IPv6 network, themulticast address is ff02::1.

Exemplarily, a process of generating the second packet according to thefirst packet may be that: if the AR receives a UDP packet sent by theCGN, and the packet includes the information for indicating Restartannounce, the AR changes, according to a network (an IPv4 network or anIPv6 network) to which the CPE belongs, a destination address in apacket header of the UDP packet to a multicast address corresponding tothe network to which the CPE belongs. That is, if the CPE belongs to anIPv4 network, the multicast address is 224.0.0.1; if the CPE belongs toan IPv6 network, the multicast address is ff02::1.

In addition, when the port number of the port through which the ARreceives the first packet, which is included in the first packet, and aport number for indicating a port through which the CPE receives thesecond packet are different, the processor 702 changes the port numberof the port through which the AR receives the first packet to the portnumber for indicating the port through which the CPE receives the secondpacket; if the port number of the port through which the AR receives thefirst packet and the port number for indicating the port through whichthe CPE receives the second packet are the same, the processor 702 doesnot need to change the port number of the port through which the ARreceives the first packet.

The processor 702 is specifically configured to: according to the firstpacket received by the protocol processing module 701, change the sourceaddress of the first packet to the address of the AR, and change thedestination address of the first packet to the address of the CPE, toobtain the second packet.

Further, the processor 702 is configured to add a CGN address option tothe second packet to carry the address of the CGN.

The option may be a THIRD_PARTY for announce option.

The THIRD_PARTY for announce option includes: an option code, a reservedfield, a length of the address of the CGN, and the address of the CGN,where the option code indicates a type of the information for indicatingRestart announce. Refer to the method embodiment for a format of theoption encapsulated into the second packet, and details are notdescribed herein again.

The protocol processing module 701 is further configured to send thesecond packet generated by the processor 702.

Exemplarily, the protocol processing module 701 is configured to sendthe second packet generated by the processor 702 to the CPE according toa multicast address in a packet header of the second packet.

Further, optionally, after receiving the second packet, the CPE sendsNAT mapping information saved by the CPE to the CGN according to the IPaddress of the CGN in the packet header of the second packet, to requestthe CGN to create the NAT mapping information.

Optionally, after receiving the second packet, the CPE sends NAT mappinginformation saved by the CPE to the CGN according to the IP address ofthe CGN in the THIRD_PARTY for announce option of the second packet, torequest the CGN to create the NAT mapping information.

This embodiment of the present application provides an AR. A CGN sends,to an AR in a unicast manner, a first packet including information forindicating Restart announce. Because there are a limited number of ARsand the ARs are static, the CGN has relatively small load when sendingthe first packet to the AR. The AR can quickly send, to a CPE in amulticast manner, a second packet including the information forindicating Restart announce. In addition, it is only required in themethod that a Layer 2 network is between the AR and the CPE. Therefore,the method is applicable to a commonest application scenario.

When the PCP protocol is used for the foregoing AR, the CGN may be a PCPserver, and the CPE may be a PCP client.

An embodiment of the present application provides a system for quicklyinforming a CGN exception, including:

a CGN, a CPE, and the AR provided in the foregoing embodiments, where astructure of the AR has been described in the foregoing embodiments andis not described herein again.

This embodiment of the present application provides a system for quicklyinforming a CGN exception. A CGN sends, to an AR in a unicast manner, afirst packet including information for indicating Restart announce.Because there are a limited number of ARs and the ARs are static, theCGN has relatively small load when sending the first packet to the AR.The AR can quickly send, to a CPE in a multicast manner, a second packetincluding the information for indicating Restart announce. In addition,it is only required in the method that a Layer 2 network is between theAR and the CPE. Therefore, the method is applicable to a commonestapplication scenario.

The foregoing descriptions are merely specific implementation manners ofthe present application, but are not intended to limit the protectionscope of the present application. Any variation or replacement readilyfigured out by a person skilled in the art within the technical scopedisclosed in the present application shall fall within the protectionscope of the present application. Therefore, the protection scope of thepresent application shall be subject to the protection scope of theclaims.

What is claimed is:
 1. A method applied in a network comprising acarrier grade network address translation (CGN) device, a plurality ofaccess devices and a plurality of customer premise equipment (CPEs),each CPE communicates with the CGN device through one of the pluralityof access devices, wherein when a CGN exception occurs on the CGNdevice, the method comprises: receiving, by a first access device,information indicating a Restart announce sent in a unicast manner bythe CGN device, where the first access device is one of the plurality ofaccess devices, and a first CPE communicates with the CGN device throughthe first access device, where the first CPE is one of the plurality ofCPEs; multicasting, by the first access device, the received informationindicating the Restart announce to CPEs among the plurality of CPEs thatare connected to the first access device, wherein the first CPE is oneof the CPEs connected to the first access device, and wherein the firstaccess device and the CPEs connected to the first access device areconnected in a Layer 2 of the network.
 2. The method according to claim1, wherein the first access device receives the information through aport of the access device.
 3. The method according to claim 1, whereinthe received information for indicating the Restart announce is carriedin a User Datagram Protocol (UDP) packet.
 4. The method according toclaim 1, wherein the received information for indicating the Restartannounce is carried in a multicast packet to multicast to the CPEsconnected to the first access device.
 5. The method according to claim1, where the first access device comprises one of: an access router anda Broadband Remote Access Server (BRAS).
 6. The method according toclaim 1, where the first access device is a router closest to the firstCPE.
 7. The method according to claim 4, where the received informationfor indicating the Restart announce is carried in a THIRD_PARTY forannounce option in the multicast packet.
 8. A first access device amonga plurality of access devices in a network, where the network includes acarrier grade network address translation (CGN) device, a plurality ofaccess devices and a plurality of customer premise equipment (CPEs),each CPE communicating with the CGN device through one of the pluralityof access devices, the first access device is one of the plurality ofthe access devices, and a first CPE in the plurality of the CPEscommunicates with the CGN device through the first access device,wherein the first access device comprises: a processor and anon-transitory processor readable storage medium including executableinstructions which, when executed by the processor, cause the processorto perform the following operations when a CGN exception occurs on theCGN device: receiving information indicating a Restart announce sent ina unicast manner by the CGN device; a) generating, according to thereceived information, a multicast packet for CPEs among the plurality ofthe CPEs that are connected to the first access device, where the firstaccess device and the CPEs connected to the first access device areconnected in a Layer 2 of the network; and b) send the generatedmulticast packet to the CPEs connected to the first access device. 9.The first access device according to claim 8, wherein the receivedinformation for indicating the Restart announce is carried in a UserDatagram Protocol (UDP) packet.
 10. The first access device according toclaim 8, wherein the multicast packet comprises a THIRD_PARTY for anannounce option.
 11. The first access device according to claim 8, wherethe first access device comprises one of: an access router and aBroadband Remote Access Server (BRAS).
 12. The first access deviceaccording to claim 8, where the first access device is a router closestto the first CPE.
 13. A non-transitory computer readable medium incommunication with a first access device among a plurality of accessdevices in a network, where the network comprises a carrier gradenetwork address translation (CGN) device, a plurality of access devicesand a plurality of customer premise equipment (CPEs) each CPEcommunicates with the CGN device through one of the plurality of accessdevices the first access device is one of the plurality of the accessdevices, a first CPE in the plurality of the CPEs communicates with theCGN device through the first access device, wherein the non-transitorycomputer readable medium comprises processor-executable instructions,which when executed by a processor cause the processor to perform thefollowing operations when a CGN exception occurs on the CGN device:receiving, information indicating a Restart announce sent in a unicastmanner by the CGN device; multicasting, the received information forindicating the Restart announce to CPEs among the plurality of the CPEsthat are connected to the first access device, wherein the first accessdevice and the CPEs connected to the first access device are connectedin a Layer 2 of the network.
 14. The non-transitory computer readablemedium according to claim 13, wherein the information is receivedthrough a port of the first access device.
 15. The non-transitorycomputer readable medium according to claim 13, wherein the receivedinformation for indicating the Restart announce is carried in a UserDatagram Protocol (UDP) packet.
 16. The non-transitory computer readablemedium according to claim 13, wherein the received information forindicating the Restart announce is carried in a multicast packet tomulticast to the CPEs connected to the first access device.
 17. Thenon-transitory computer readable medium according to claim 13, where thefirst access device comprises one of: an access router and a BroadbandRemote Access Server (BRAS).
 18. The non-transitory computer readablemedium according to claim 13, where the first access device is a routerclosest to the first CPE.
 19. The non-transitory computer readablemedium according to claim 16, where the received information forindicating the Restart announce is carried in a THIRD_PARTY for announceoption in the multicast packet.